package org.adorsys.aderp.cash.web.ext;

import javax.annotation.Resource;

import org.adorsys.aderp.aderplogin.domain.AderpUser;
import org.adorsys.aderp.aderplogin.service.AderpUserService;
import org.adorsys.aderp.jpa.security.SecurityUtils;
import org.springframework.stereotype.Service;
/**
 * 
 * @author Boris Waguia
 *
 * This class contains all remote methods access. It will serve as an utility class for 
 * all other classes needing to remote some services.
 */
@Service
public class RemoteCallService {
	@Resource
	private AderpUserService aderpUserService;
	
	public AderpUser findUserByUserName(){
		String userName = SecurityUtils.getUserName();
		return aderpUserService.findByUserName(userName);
	}
}
